<template>
  <div class="lend">
    <el-card class="box-card" shadow="never">
      <myHeader ref="searchForm"/>
      <dynTable
        ref="dynTable"
        :loading="tableLoading"
        :table-data="tableData"
        :table-columns="tableColumns"
      />
      <el-row :gutter="20">
        <el-col :span="6" :offset="20">
          <el-button
            type="primary"
            icon="el-icon-document-checked"
          >{{ $t('lend') }}</el-button
          >
          <el-button
            type="danger"
            icon="el-icon-delete"
            @click="resetForm"
          >{{ $t('reset') }}</el-button
          >
        </el-col>
      </el-row>
    </el-card>
  </div>
</template>
<script>
import myHeader from '../compontents/header'
export default {
  name: 'Lend',
  components: { myHeader },
  data() {
    return {
      tableData: [],
      tableColumns: [
        { prop: '', label: this.$t('toolingBarcode') },
        { prop: '', label: this.$t('toolingType') },
        { prop: '', label: this.$t('toolingModel') },
        { prop: '', label: this.$t('stock') },
        { prop: '', label: this.$t('owner') },
        { prop: '', label: this.$t('actionType') },
        { prop: '', label: this.$t('lendTimes') },
        { prop: '', label: this.$t('lendId') }
      ],
      tableLoading: false
    }
  },
  methods: {
    scopedHandle(val) {
      console.log('接收到子组件的值', val)
    },
    resetForm() {
      this.$refs.searchForm.resetForm('ruleForm')
    }
  }
}
</script>
<style lang='scss' scoped>
.box-card {
  width: 1200px;
  margin: 0 auto;
}
.el-row {
  margin-top: 20px;
}
</style>
